<p>The server access log records all requests processed by the
server. The location and content of the access log are
controlled by the <code class="directive"><a href="./mod/mod_log_config.html#customlog">CustomLog</a></code>
directive. The <code class="directive"><a href="./mod/mod_log_config.html#logformat">LogFormat</a></code>
directive can be used to simplify the selection of
the contents of the logs. This section describes how to configure the server
to record information in the access log.</p>
<p>Of course, storing the information in the access log is only
the start of log management. The next step is to analyze this
information to produce useful statistics. Log analysis in
general is beyond the scope of this document, and not really
part of the job of the web server itself. For more information
about this topic, and for applications which perform log
analysis, check the <a href="http://dmoz.org/Computers/Software/Internet/Site_Management/Log_analysis/">
Open Directory</a> or <a href="http://dir.yahoo.com/Computers_and_Internet/Software/Internet/World_Wide_Web/Servers/Log_Analysis_Tools/">
Yahoo</a>.</p>
<p>Various versions of Apache httpd have used other modules and
directives to control access logging, including
mod_log_referer, mod_log_agent, and the
<code>TransferLog</code> directive. The <code class="directive"><a href="./mod/mod_log_config.html#customlog">CustomLog</a></code> directive now subsumes
the functionality of all the older directives.</p>
<p>The format of the access log is highly configurable. The format
is specified using a format string that looks much like a C-style
printf(1) format string. Some examples are presented in the next
sections. For a complete list of the possible contents of the
format string, see the <code class="module"><a href="./mod/mod_log_config.html">mod_log_config</a></code> <a href="mod/mod_log_config.html#formats">format strings</a>.</p>
<p>This example also shows that it is not necessary to define a
nickname with the <code class="directive"><a href="./mod/mod_log_config.html#logformat">LogFormat</a></code> directive. Instead,
the log format can be specified directly in the <code class="directive"><a href="./mod/mod_log_config.html#customlog">CustomLog</a></code> directive.</p>
<p>When using the powerful and complex features of <a href="mod/mod_rewrite.html">mod_rewrite</a>, it is almost
always necessary to use the <code class="directive"><a href="./mod/mod_rewrite.html#rewritelog">RewriteLog</a></code> to help
in debugging. This log file produces a detailed analysis of how
the rewriting engine transforms requests. The level of detail
is controlled by the <code class="directive"><a href="./mod/mod_rewrite.html#rewriteloglevel">RewriteLogLevel</a></code> directive.</p>
</div></div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="./en/logs.html" title="English"> en </a> |
<a href="./ja/logs.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="./ko/logs.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
</div><div id="footer">
<p class="apache">Copyright 1995-2006 The Apache Software Foundation or its licensors, as applicable.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>